

<div class="pad-10">

	<div class="navigate">
		<h1>任务编辑</h1>

            <span class="ui-button ui-button-morange fr">
                    <a class="ui-button-text fr" href="javascript:history.back()">返回</a>
            </span>
  	</div>
  	
  	
<div class="col-tab">
<ul class="tabBut cu-li">
	<li id="tab_setting_1" class="on"
		onclick="SwapTab('setting','on','',2,1);">任务编辑</li>
</ul>
<div id="div_setting_1" class="contentList pad-10">

<form id="form_task" action="/index.php/Admin/Task/update" method="post">

<table width="100%" cellpadding="2" cellspacing="1" class="table_form">

	<tr>
		<th width="100">商务运维:</th>
		<td>
			<select name="business_admin_id" id="business_admin_id" style="width:300px;" disabled onfocus="this.defaultIndex=this.selectedIndex;" onchange="this.selectedIndex=this.defaultIndex;">
				<volist name="admins" id="a">
				<option value="{$a.id}"<eq name="task.business_admin_id" value="$a.id"> selected</eq>>{$a.real_name}</option>
				</volist>
          	</select>
          	<span class="color-red" title="必填">*</span>
		</td>
		<th></th>
	</tr>
	
	<tr>
		<th width="100">客户:</th>
		<td>
		
			<select name="user_id" id="user_id">
				<volist name="users" id="u">
				<option value="{$u.user_id}"<if condition="$task['user_id'] eq $u['user_id']">selected</if>>[{$u.user_id}]&nbsp;[{$u.plantform_name}]&nbsp;[{$u.shop_name}]&nbsp;{$u.user_name}</option>
				</volist>
          	</select>
          	<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	<tr>
		<th width="100">开始时间:</th>
		<td>
		
    	<input type="text" class="Wdate tc w150" id="begin" name="begin_time" onclick="javascript:WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" value="{$task.begin_time}" />
    	<span class="color-red" title="必填">*</span>
    	结束时间:
    	<input type="text" class="Wdate tc w150" id="end" name="end_time" onclick="javascript:WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" value="{$task.end_time}" />
    	<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	<tr>
		<th width="100">代付费:</th>
		<td>
		<input type="text" name="task_order_money" id="task_order_money" class="input-text"
			value="{$task.task_order_money}" style="width:300px;">
			<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	
	<tr>
		<th width="100">手续费:</th>
		<td>
		<input type="text" name="commission_money" id="commission_money" class="input-text"
			value="{$task.commission_money}" style="width:300px;">
			<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	
	<tr>
		<th width="100">快递信息:</th>
		<td>
		<input type="text" name="value_added_money" id="value_added_money" class="input-text"
			value="{$task.value_added_money}" style="width:300px;">
			<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	
	<tr class="hidden">
		<th width="100">活动:</th>
		<td>
		<input type="text" name="activity" id="activity" class="input-text"
			value="{$task.activity}" style="width:300px;">
		</td>
	</tr>
	
	<tr class="hidden">
		<th width="100">订单量:</th>
		<td>
		<input type="text" name="order_count" id="order_count" class="input-text"
			value="{$task.order_count}" style="width:300px;">
			<span class="color-red" title="必填">*</span>
		</td>
	</tr>

	<tr>
		<th width="100">支付状态:</th>
		<td>
		
			<volist name="task_pay_status" id="s">
				<input type="radio" id="tps_{$s.id}" name="pay_status" value="{$s.id}" <eq name="task.pay_status" value="$s.id"> checked</eq> />
				<label for="tps_{$s.id}">{$s.name}</label>
				&nbsp;&nbsp;&nbsp;
			</volist>
			
			<if condition="($task['pay_status'] eq TPS_UNPAY) OR ($task['pay_status'] eq TPS_REFUND)">
								
				<if condition="$task['task_status'] neq TS_CANCEL">
				<input type="button" id="btnCancel" value="取消任务单" />
				</if>
				
			</if>
			
		</td>
	</tr>
	
	<tr class="hidden">
		<th width="100">任务状态:</th>
		<td>
		
			<volist name="task_status" id="s">
				<input type="radio" id="ts_{$s.id}" name="task_status" value="{$s.id}" <eq name="task.task_status" value="$s.id"> checked</eq> />
				<label for="ts_{$s.id}">{$s.name}</label>
				&nbsp;&nbsp;&nbsp;
			</volist>
		
		</td>
	</tr>
	
	<if condition="$is_task_log_add"> 
	
	<tr>
		<th width="100">留言备注:</th>
		<td>
			<textarea name="message" id="message" rows="2" cols="100"></textarea>
		</td>
	</tr>
	
	</if>
	
	<tr>
		<th width="100"></th>
	
		<td>
			<input type="submit" class="button" value="保存" id="btnSubmit" />
		</td>
	
</table>
</div>

<input type="hidden" name="task_id" value="{$task.task_id}" />
<input type="hidden" id="referer" value="{$referer}" />

</form>


<table width="100%" cellpadding="2" cellspacing="1" class="table_form">

	<tr>
		
		<th style="width:120px;">管理员</th>
		<th style="">内容</th>
		<th style="width:100px;">任务状态</th>
		<th style="width:100px;">支付状态</th>
		<th style="width:120px;">添加日期</th>
	</tr>

	<volist name="task_logs" id="t">
	<tr>
		
		<td class="tc">{$t.real_name}</td>
		<td>{$t.message}</td>
		<td class="tc">{$t.task_status_name}</td>
		<td class="tc">{$t.pay_status_name}</td>
		<td class="tc">{$t.created}</td>		
	</tr>
	</volist>
</table>

</div>




</div>



<script type="text/javascript" src="/Js/WdatePicker.js"></script>
<script type="text/javascript" src="/Js/jquery.form.js"></script>
<script type="text/javascript" src="/Js/adm/task/detail.js"></script>